package middleware

import (
	"fiber-layout/app/constant"
	"fiber-layout/app/exceptions"
	"github.com/gofiber/fiber/v2"
)

// ErrorHandler jwt错误处理中间件
func ErrorHandler() fiber.ErrorHandler {
	return func(c *fiber.Ctx, err error) error {
		return exceptions.Error(c,constant.ErrTokenAuth.Error())
	}
}